home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / man / lib.fmt / c / gethostname.man < prev    next >
Encoding:
Text File  |  1989-01-07  |  1.8 KB  |  67 lines

  1.  
  2.  
  3.  
  4. GETHOSTNAME           C Library Procedures            GETHOSTNAME
  5.  
  6.  
  7.  
  8. NNAAMMEE
  9.      gethostname, sethostname - get/set name of current host
  10.  
  11. SSYYNNOOPPSSIISS
  12.      ggeetthhoossttnnaammee((nnaammee,, nnaammeelleenn))
  13.      cchhaarr **nnaammee;;
  14.      iinntt nnaammeelleenn;;
  15.  
  16.      sseetthhoossttnnaammee((nnaammee,, nnaammeelleenn))
  17.      cchhaarr **nnaammee;;
  18.      iinntt nnaammeelleenn;;
  19.  
  20. DDEESSCCRRIIPPTTIIOONN
  21.      _G_e_t_h_o_s_t_n_a_m_e returns the standard host name for the current
  22.      processor, as previously set by _s_e_t_h_o_s_t_n_a_m_e.  The parameter
  23.      _n_a_m_e_l_e_n specifies the size of the _n_a_m_e array.  The returned
  24.      name is null-terminated unless insufficient space is pro-
  25.      vided.
  26.  
  27.      _S_e_t_h_o_s_t_n_a_m_e sets the name of the host machine to be _n_a_m_e,
  28.      which has length _n_a_m_e_l_e_n.  This call is restricted to the
  29.      super-user and is normally used only when the system is
  30.      bootstrapped.
  31.  
  32. RREETTUURRNN VVAALLUUEE
  33.      If the call succeeds a value of 0 is returned.  If the call
  34.      fails, then a value of -1 is returned and an error code is
  35.      placed in the global location _e_r_r_n_o.
  36.  
  37. EERRRROORRSS
  38.      The following errors may be returned by these calls:
  39.  
  40.      [EFAULT]       The _n_a_m_e or _n_a_m_e_l_e_n parameter gave an invalid
  41.                     address.
  42.  
  43.      [EPERM]        The caller tried to set the hostname and was
  44.                     not the super-user.
  45.  
  46. SSEEEE AALLSSOO
  47.      gethostid(2)
  48.  
  49. BBUUGGSS
  50.      Host names are limited to MAXHOSTNAMELEN (from
  51.      <_s_y_s/_p_a_r_a_m._h>) characters, currently 64.
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63. Sprite v1.0               May 22, 1986                          1
  64.  
  65.  
  66.  
  67.